package com.ciaojian.worker.factory;

import com.ciaojian.core.enums.business.WorkerWorkerStatusEnum;
import com.ciaojian.worker.strategy.workerstatus.StatusModifier;

import java.util.HashMap;
import java.util.Map;

/**
 * @author oxiny
 */
public class StatusModifierFactory {
    public static Map<WorkerWorkerStatusEnum, StatusModifier> MAP = new HashMap<>();

    /**
     * 获取发型师状态修改器
     *
     * @param workerStatus 发型师状态
     * @return /
     */
    public static StatusModifier get(WorkerWorkerStatusEnum workerStatus) {
        return MAP.get(workerStatus);
    }

    /**
     * 注册方法
     *
     * @param statusModifier 状态修改器
     */
    public static void register(StatusModifier statusModifier) {
        MAP.put(statusModifier.getStatus(), statusModifier);
    }
}
